package com.gateway.repository.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * <p>
 * 网关接口元数据表
 * </p>
 *
 * @author auto_generation
 * @since 2025-02-04
 */
@TableName("gateway_api_meta_data")
public class GatewayApiMetaData implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * appId
     */
    private String appId;

    /**
     * app名称
     */
    private String appName;

    /**
     * 请求路径
     */
    private String apiPath;

    /**
     * 服务id
     */
    private String serviceId;

    /**
     * 全限定名
     */
    private String qualifiedName;

    /**
     * 方法名
     */
    private String methodName;

    /**
     * method类型
     */
    private String httpMethod;

    /**
     * 提交内容类型（Content-Type）
     */
    private String consume;

    /**
     * 返回的内容类型
     */
    private String produce;

    /**
     * rpc类型
     */
    private String rpcType;

    /**
     * 环境变量
     */
    private String env;

    /**
     * 描述
     */
    private String description;

    /**
     * 是否添加前缀
     */
    private Integer addPrefixed;

    /**
     * 备注
     */
    private String remark;

    /**
     * 行记录创建者
     */
    private String creator;

    /**
     * 行记录最近更新人
     */
    private String modifier;

    /**
     * 行记录创建时间
     */
    private Date createdTime;

    /**
     * 行记录最近修改时间
     */
    private Date modifiedTime;

    /**
     * 行版本号
     */
    @Version
    private Integer version;

    /**
     * 拓展字段
     */
    private String extension;

    /**
     * 是否删除
     */
    private Long deleted;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    public String getApiPath() {
        return apiPath;
    }

    public void setApiPath(String apiPath) {
        this.apiPath = apiPath;
    }

    public String getServiceId() {
        return serviceId;
    }

    public void setServiceId(String serviceId) {
        this.serviceId = serviceId;
    }

    public String getQualifiedName() {
        return qualifiedName;
    }

    public void setQualifiedName(String qualifiedName) {
        this.qualifiedName = qualifiedName;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public String getHttpMethod() {
        return httpMethod;
    }

    public void setHttpMethod(String httpMethod) {
        this.httpMethod = httpMethod;
    }

    public String getConsume() {
        return consume;
    }

    public void setConsume(String consume) {
        this.consume = consume;
    }

    public String getProduce() {
        return produce;
    }

    public void setProduce(String produce) {
        this.produce = produce;
    }

    public String getRpcType() {
        return rpcType;
    }

    public void setRpcType(String rpcType) {
        this.rpcType = rpcType;
    }

    public String getEnv() {
        return env;
    }

    public void setEnv(String env) {
        this.env = env;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getAddPrefixed() {
        return addPrefixed;
    }

    public void setAddPrefixed(Integer addPrefixed) {
        this.addPrefixed = addPrefixed;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public String getModifier() {
        return modifier;
    }

    public void setModifier(String modifier) {
        this.modifier = modifier;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getModifiedTime() {
        return modifiedTime;
    }

    public void setModifiedTime(Date modifiedTime) {
        this.modifiedTime = modifiedTime;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public String getExtension() {
        return extension;
    }

    public void setExtension(String extension) {
        this.extension = extension;
    }

    public Long getDeleted() {
        return deleted;
    }

    public void setDeleted(Long deleted) {
        this.deleted = deleted;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        GatewayApiMetaData that = (GatewayApiMetaData) o;
        return Objects.equals(id, that.id) && Objects.equals(appId, that.appId) && Objects.equals(appName, that.appName) && Objects.equals(apiPath, that.apiPath) && Objects.equals(serviceId, that.serviceId) && Objects.equals(qualifiedName, that.qualifiedName) && Objects.equals(methodName, that.methodName) && Objects.equals(httpMethod, that.httpMethod) && Objects.equals(consume, that.consume) && Objects.equals(produce, that.produce) && Objects.equals(rpcType, that.rpcType) && Objects.equals(env, that.env) && Objects.equals(description, that.description) && Objects.equals(addPrefixed, that.addPrefixed) && Objects.equals(remark, that.remark) && Objects.equals(creator, that.creator) && Objects.equals(modifier, that.modifier) && Objects.equals(createdTime, that.createdTime) && Objects.equals(modifiedTime, that.modifiedTime) && Objects.equals(version, that.version) && Objects.equals(extension, that.extension) && Objects.equals(deleted, that.deleted);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, appId, appName, apiPath, serviceId, qualifiedName, methodName, httpMethod, consume, produce, rpcType, env, description, addPrefixed, remark, creator, modifier, createdTime, modifiedTime, version, extension, deleted);
    }

    @Override
    public String toString() {
        return "GatewayApiMetaData{" +
                "id=" + id +
                ", appId=" + appId +
                ", appName='" + appName + '\'' +
                ", apiPath='" + apiPath + '\'' +
                ", serviceId='" + serviceId + '\'' +
                ", qualifiedName='" + qualifiedName + '\'' +
                ", methodName='" + methodName + '\'' +
                ", httpMethod='" + httpMethod + '\'' +
                ", consume='" + consume + '\'' +
                ", produce='" + produce + '\'' +
                ", rpcType='" + rpcType + '\'' +
                ", env='" + env + '\'' +
                ", description='" + description + '\'' +
                ", addPrefixed=" + addPrefixed +
                ", remark='" + remark + '\'' +
                ", creator='" + creator + '\'' +
                ", modifier='" + modifier + '\'' +
                ", createdTime=" + createdTime +
                ", modifiedTime=" + modifiedTime +
                ", version=" + version +
                ", extension='" + extension + '\'' +
                ", deleted=" + deleted +
                '}';
    }
}
